<template>
	<view class="content">
		<uni-loding :loading='loading'></uni-loding>
		<view class="main-box">
			<image :src="img" mode="widthFix" class="img"></image>
			<view class="parse-box">
				<u-parse :content="info" :imageProp="{
							mode: 'widthFix',
							lazyLoad:true
						}" />
			</view>
		</view>
	</view>
</template>

<script>
	import richTextUtil from '@/utils/richTextUtil.js';
	import uParse from '@/components/u-parse/u-parse.vue';
	export default {
		components: {
			uParse
		},
		data() {
			return {
				loading: false,
				img: '',
				info: ''
			}
		},
		onLoad(pramas) {
			this.init(pramas.sn);
			uni.setNavigationBarTitle({
				title: pramas.title
			});
		},
		methods: {
			init(sn) {
				this.$func.request('/car/guide/' + sn).then(res => {
					this.img = res.data.data.img;
					this.info = res.data.data.content;
					this.loading = false
				}).catch(error => {
					this.loading = false
				})
			},
		}
	}
</script>

<style scoped>
	.main-box {
		height: 100vh;
		padding-bottom: 150rpx;
		box-sizing: border-box;
	}

	.img {
		width: 100%;
		margin-bottom: 50rpx;
	}

	.parse-box {
		padding-bottom: 100rpx;
		overflow: auto;
		box-sizing: border-box;
	}

	>>>.wxParse {
		padding: 30rpx!important;
	}

	>>>.wxParse .video-video {
		width: 100%;
	}
</style>